<template>
  <div id="app">
      <!-- <h1>{{title}}</h1>
      <ul>
          <li v-for="item in posts" :key="item.id">{{item.title}}</li>
      </ul> -->
      <Bar :posts="posts"/>
  </div>
</template>
<script>
import axios from "axios"
import Bar from "../components/bar"
export default {
  // layout:"foo",
  name:"userPage",
  components:{
    Bar
  },
  async asyncData(){
     const { data } = await axios({
         method:"GET",
         url:"http://localhost:3000/data.json"
     })
     return data
  }
}
</script>

<style>

</style>